package com.sx.manage.controller.log;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sx.manage.controller.base.MBaseController;
import com.sx.manage.service.log.IMBaseSysOperLogService;
import com.sx.manage.servlet.ViewAndModel;
import com.sx.model.constants.type.consumer.MConsumersNatures;
import com.sx.model.manage.mybatis.form.log.MOperLogInfoForm;
import com.sx.model.manage.mybatis.vo.log.MSysOperLogVO;
import com.sx.model.manage.mybatis.vo.result.ResultListVO;

/**
 * 系统日志控制器
 * 
 * @author lenovo
 *
 */
@Controller
@RequestMapping(value="/mOperLog")
public class MSysOperLogController  extends MBaseController{
	
	
	@Resource(name="mBaseSysOperLogServiceImpl")
	public  IMBaseSysOperLogService sysOperLogServiceImpl; 
	/**
	 * 跳转到 普通用户列表界面
	 */
	@RequestMapping(value = "operLogView")
	public ViewAndModel operLogView() {
		ViewAndModel modelView = new ViewAndModel(request,cache);
					 modelView.setViewName("operLog/operLogManage");
		// 界面展开 菜单栏使用
		return modelView;
	}

	/**
	 * 日志查询翻页
	 * @param file
	 * @return
	 */
	@RequestMapping(value="logPage")
	@ResponseBody
	public ResultListVO<MSysOperLogVO> logPage(MOperLogInfoForm form){
		form.setConsumer_nature( MConsumersNatures.USER_CENTER);
		return sysOperLogServiceImpl.getOperLogPage(form) ;
	}
 
}
